<!--
 * @Author: your name
 * @Date: 2021-08-24 21:56:39
 * @LastEditTime: 2021-08-24 22:15:55
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\5-javascript\day02\5-水仙花树.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        for (var n = 100; n <= 999; n++) {
            var a = n % 10; //个位
            var b = parseInt(n % 100 / 10); //十位
            var c = parseInt(n / 100); //百位
            if (n == a * a * a + b * b * b + c * c * c) {
                console.log(n);
            }
        }
    </script>
</head>

<body>

</body>

</html>
</body>

</html>